import 'package:base_flutter/base_flutter.dart';

class ShopCarModel extends BaseMvvmModel{

  static ShopCarModel? _instance;

  static ShopCarModel get instance => _instance??=ShopCarModel._();

  ShopCarModel._();

  List<String> shopCarContent = [];

  @override
  void onCleared() {
  }


  void addItem(String item){
    shopCarContent.add(item);
  }

  void removeItem(String item){
    shopCarContent.remove(item);
  }


}

extension ShopCarExt on String{
  bool get contain => ShopCarModel.instance.shopCarContent.contains(this);
}